package com.learn.pattern.parse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Reader;
import java.util.List;

/**
 * @version 1.0
 * @author: YU.TAN
 * @date: 2023/3/9 23:30
 * @Description:
 */
@Service
public class ParserClient {

    @Autowired
    private ParserFactory parserFactory;

    public List getAll(ParseTypeEnum parseType){
        Reader reader = null;
        List parse = parserFactory.getParser(parseType).parse(reader);
        return parse;
    }
}
